package cn.com.cifi.mars.constant;

import org.apache.commons.lang.StringUtils;
/**
 * 
 * 类名称：ApprovedStateNameCodeEnum
 * 类描述：OA状态码映射表 枚举类
 * 创建人：yyd
 * 创建时间：2020年1月1日 下午3:27:54
 * @version 1.0.0
 */
public enum ApprovedStateNameCodeEnum {

    DELETE("delete","实例被删除"),
    NOT_LAUNCHED("not_launched","未发起"),
    DRAFT("draft","流程草稿"),
    APPROVAL("approval","审批中"),
    APPROVAL_SUCCESS("approval_success","审批通过"),
    REJECT("reject","驳回发起"),
    RECALL("recall","撤回发起"),
    ENDFLOW("endflow","废弃流程"),
    PROFESSIONAL_AUDIT("professional_audit","开始专业审核"),
    PROFESSIONAL_AUDIT_RECALL("professional_audit_recall","专业审核节点被撤回");
	
    private String key;
    private String value;

    
    public static String getValueByKey(String key){
    	if(StringUtils.isNotBlank(key)) {
    		for(ApprovedStateNameCodeEnum approvedStateNameCodeEnum:ApprovedStateNameCodeEnum.values()){
                if(key.equals(approvedStateNameCodeEnum.getKey())){
                    return approvedStateNameCodeEnum.getValue();
                }
            }
    	}
        return  null;
    }
    
    
    ApprovedStateNameCodeEnum(String key,String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

}
